Skip to content

Validate skipped update diagnostics state#4490

Merged
FlorianPfaff merged 2 commits into
mainfrom
agent/validate-skipped-update-diagnostics
Jul 17, 2026
Merged

Validate skipped update diagnostics state#4490
FlorianPfaff merged 2 commits into
mainfrom
agent/validate-skipped-update-diagnostics

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Bug

MeasurementUpdateDiagnostics could represent a contradictory update state: callers could provide both a non-empty active_measurement_indices sequence and a skipped_reason. The resulting object reported active measurements while updated returned False, making diagnostics and downstream logging disagree about whether the update used data.

Whitespace-only skip reasons were also accepted, so a skipped update could carry no meaningful explanation despite passing the non-empty string validation.

Fix

  • reject skipped diagnostics that also contain active measurement indices
  • reject whitespace-only skipped_reason values
  • preserve valid accepted-update and MeasurementUpdateDiagnostics.skipped(...) behavior

Validation

  • added focused regressions for contradictory skipped states and whitespace-only reasons
  • ran a local syntax and focused behavior check for the updated diagnostics module

@FlorianPfaff
FlorianPfaff enabled auto-merge (squash) July 17, 2026 01:48
@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 23.88s
✅ JSON prettier 7 0 0 0 0.44s
✅ JSON v8r 7 0 0 4.53s
✅ MARKDOWN markdownlint 68 0 0 0 1.83s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.76s
✅ PYTHON black 1550 198 0 0 97.91s
✅ PYTHON isort 1550 369 0 0 2.72s
✅ REPOSITORY betterleaks yes no no 2.57s
✅ REPOSITORY checkov yes no no 54.55s
✅ REPOSITORY gitleaks yes no no 14.97s
✅ REPOSITORY git_diff yes no no 0.17s
✅ REPOSITORY secretlint yes no no 63.72s
✅ REPOSITORY syft yes no no 6.2s
✅ REPOSITORY trivy-sbom yes no no 7.64s
✅ REPOSITORY trufflehog yes no no 31.98s
✅ YAML prettier 11 0 0 0 0.74s
✅ YAML v8r 11 0 0 11.6s
✅ YAML yamllint 11 0 0 0.61s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

@FlorianPfaff
FlorianPfaff merged commit 700d94e into main Jul 17, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant